class CreateGrades < ActiveRecord::Migration
  def self.up
    create_table :grades do |t|
      t.column :code, :string
      t.column :description, :string
      t.column :display_order, :integer
      t.column :active, :boolean, :default => false      
      t.column :created_at, :string
      t.column :updated_at, :string
    end
    
    Grade.create(:code => 'A', :description => '90-100')
    Grade.create(:code => 'B', :description => '80-89')
    Grade.create(:code => 'C', :description => '70-79')
    Grade.create(:code => 'D', :description => '60-69')
    Grade.create(:code => 'F', :description => '00-59')
  end

  def self.down
    drop_table :grades
  end
end
